<template>
  <div class="login-wrap">
    <div class="left-context">
      <img
        src="../assets/img/undraw_profile_data_re_v81r_1.png"
        alt=""
        class="login-img"
      />
    </div>
    <div class="right-context">
      <div class="context-text">用户资料完善</div>
      <div class="context-login">
        <el-form :model="ruleForm" :rules="rules" ref="ruleForm" size="medium">
          <el-form-item prop="avatar">
            <el-avatar
              :size="50"
              :src="circleUrl"
              v-model="ruleForm.avatar"
              style="margin-left: 130px;margin-top: 10px;"
            ></el-avatar>
          </el-form-item>
          姓名
          <el-form-item prop="username">
            <el-input v-model="ruleForm.username"></el-input>
          </el-form-item>
          邮箱
          <el-form-item prop="email">
            <el-input v-model="ruleForm.email"></el-input>
          </el-form-item>
          生日
          <el-form-item prop="birthday">
            <el-input v-model="ruleForm.birthday"></el-input>
          </el-form-item>
          手机验证码
          <el-form-item prop="phone">
            <el-input v-model="ruleForm.phone"></el-input>
          </el-form-item>
          性别
          <el-form-item>
            <el-radio-group v-model="ruleForm.sex">
              <el-radio :label="0">女</el-radio>
              <el-radio :label="1">男</el-radio>
            </el-radio-group>
          </el-form-item>
          <el-form-item style="width: 100%">
            <el-button size="medium" type="primary" class="submit-btn"
              >登录</el-button
            >
          </el-form-item>
        </el-form>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data: function () {
    return {
      circleUrl:
        "https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png",
      flag: false,
      ruleForm: {
        avatar: "",
        email: "",
        username: "",
        birthday: "",
        phone: "",
        sex: "",
      },
      rules: {
        email: [{ required: true, message: "请输入邮箱", trigger: "blur" }],
        username: [{ required: true, message: "请输入姓名", trigger: "blur" }],
        birthday: [{ required: true, message: "请输入生日", trigger: "blur" }],
        password: [{ required: true, message: "请输入密码", trigger: "blur" }],
        phone: [{ required: true, message: "请输入手机号", trigger: "blur" }],
      },
    };
  },
  methods: {
    registerForm() {
      this.$router.push("/register");
    },
    resetpwdForm() {
      this.$router.push("/resetpwd");
    },
  },
};
</script>
<style scoped>
.login-wrap {
  width: 1024px;
  height: 600px;
  margin: 6% 0 0 20%;
  background-color: #fff;
}
.login-img {
  width: 400px;
  height: 250px;
  margin: 150px 0 0 80px;
}
.left-context {
  float: left;
  width: 512px;
  height: 600px;
  background-color: #9a9aeb;
}
.right-context {
  position: relative;
  float: right;
  width: 512px;
  height: 600px;
}
.context-text {
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  margin-top: 20px;
}
.context-login {
  position: absolute;
  width: 350px;
  height: 470px;
  margin-left: 95px;
  margin-top: 5px;
}
.submit-btn {
  width: 100%;
  background-color: #1e1e1e;
  border-radius: 5px;
}
</style>
